﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Admin/Admin.master" AutoEventWireup="true" CodeFile="QLVideo.aspx.cs" Inherits="Admin_Video_QLVideo" %>

<%@ Register TagPrefix="FTB" Namespace="FreeTextBoxControls" Assembly="FreeTextBox" %>
<%@ Register Assembly="PagerControl" Namespace="CutePager" TagPrefix="cc1" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" Runat="Server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="HomePlaceHolder" Runat="Server">
 <div class="hrm_header_placeholder">
        Quản lý Video</div>
    <asp:UpdatePanel ID="UpdatePanel1" runat="server">
    <ContentTemplate>
    <div style="padding: 10px">
        <asp:HiddenField ID="H_FileName" Value="" runat="server" />
        <asp:HiddenField ID="H_TepTin" Value="" runat="server" />
        <asp:HiddenField ID="H_CatalogId" Value="0" runat="server" />
        <asp:HiddenField ID="H_Video" Value="" runat="server" />
        <asp:HiddenField ID="HiddenField1" Value="0" runat="server" />
        <asp:Panel ID="PanelAdd" Width="100%" GroupingText="Cập nhật thông tin" runat="server">
            <table border="0" width="100%" cellpadding="0" cellspacing="0">
                <tr>
                    <td colspan="4" height="10">
                    </td>
                </tr>
                <tr>
                    <td width="20">
                    </td>
                    <td width="110" class="hrm_title_blue">
                    </td>
                    <td width="7" class="hrm_title_blue">
                    </td>
                    <td>
                        <asp:Label ID="lblStatus" ForeColor="Red" runat="server" Text=""></asp:Label>
                    </td>
                </tr>
                <tr>
                    <td colspan="4" height="4">
                    </td>
                </tr>
                <tr>
                    <td width="20">
                    </td>
                    <td width="110" class="hrm_title_blue">
                        Tiêu đề
                    </td>
                    <td width="7" class="hrm_title_blue">
                        :
                    </td>
                    <td>
                        <asp:TextBox ID="txtTieuDe" CssClass="hrm_textbox" Width="400px" MaxLength="100" runat="server"></asp:TextBox>
                        <asp:RequiredFieldValidator ID="RequiredFieldValidator4" runat="server" SetFocusOnError="True"
                            ControlToValidate="txtTieuDe" Display="Dynamic" ErrorMessage=" (*)"></asp:RequiredFieldValidator>
                    </td>
                </tr>
                <tr>
                    <td colspan="4" height="4">
                    </td>
                </tr>
                <tr>
                    <td width="20">
                    </td>
                    <td width="110" class="hrm_title_blue">
                        Diễn giải
                    </td>
                    <td width="7" class="hrm_title_blue">
                        :
                    </td>
                    <td>
                        <asp:TextBox ID="txtDienGiai" TextMode="MultiLine" CssClass="hrm_textbox" Width="400px" Height="70px" MaxLength="500" runat="server"></asp:TextBox>
                        <asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" SetFocusOnError="True"
                            ControlToValidate="txtDienGiai" Display="Dynamic" ErrorMessage=" (*)"></asp:RequiredFieldValidator>
                    </td>
                </tr>
                <tr>
                    <td colspan="4" height="10">
                    </td>
                </tr>
                <tr>
                    <td width="20">
                    </td>
                    <td width="80" class="hrm_title_blue">
                        Link Video File
                    </td>
                    <td width="7" class="hrm_title_blue">
                        :
                    </td>
                    <td width="400">
                        <asp:TextBox ID="txtVideo" CssClass="hrm_textbox" Width="400px" MaxLength="100" runat="server"></asp:TextBox>
                        
                    </td>
                </tr>
                <tr>
                    <td colspan="2" height="4">
                    </td>
                    <td colspan="2" style="font-weight: bold; color: red" height="4">
                    Từ chuỗi Video, copy dòng màu xanh: http://www.youtube.com/v/<font color="green">fMcqORJld8E </font>
                    </td>
                </tr>
                
                <tr>
                    <td colspan="4" height="4">
                    </td>
                </tr>
                <tr>
                    <td width="20">
                    </td>
                    <td width="80" class="hrm_title_blue">
                        Trạng Thái
                    </td>
                    <td width="7" class="hrm_title_blue">
                        :
                    </td>
                    <td>
                        <asp:CheckBox ID="chkTinNong" Checked="true" runat="server" />
                    </td>
                </tr>
                <tr>
                    <td colspan="4" height="4">
                    </td>
                </tr>
                <tr>
                    <td width="20">
                    </td>
                    <td width="110" class="hrm_title_blue">
                    </td>
                    <td width="7" class="hrm_title_blue">
                    </td>
                    <td>
                        <asp:ImageButton ID="cmdSave" ImageUrl="~/Images/save.jpg" runat="server" OnClick="cmdSave_Click" />
                        <asp:ImageButton ID="cmdReset" CausesValidation="false" ImageUrl="~/Images/huy.jpg"
                            runat="server" OnClick="cmdReset_Click" />
                    </td>
                </tr>
                <tr>
                    <td colspan="4" height="8">
                    </td>
                </tr>
            </table>
        </asp:Panel>
        <asp:Panel ID="PanelList" Width="100%" Height="355" GroupingText="Danh sách" runat="server">
            <table border="0" width="100%" cellpadding="0" cellspacing="0">
                <tr>
                    <td width="20">
                    </td>
                    <td style="padding-right: 15px; padding-top: 10px">
                        <asp:GridView ID="gridCatalog" runat="server" DataKeyNames="Id" Width="100%" BackColor="White"
                            OnRowCommand="gridCatalog_RowCommand" OnRowDataBound="gridCatalog_RowDataBound"
                            EmptyDataText="<br><center>Không tồn tại dữ liệu</center><br>" BorderColor="#CCCCCC"
                            AutoGenerateColumns="false" BorderStyle="Solid" BorderWidth="1px" CellPadding="3"
                            OnRowDeleting="gridCatalog_RowDeleting">
                            <Columns>
                                <asp:TemplateField ItemStyle-HorizontalAlign="Center" HeaderStyle-HorizontalAlign="Center" ItemStyle-Width="7%"  HeaderText="Sửa">
                                    <ItemTemplate>
                                        <asp:ImageButton ID="cmdSelects" runat="server" CssClass="command_button" CausesValidation="false"
                                            CommandName="Select" ToolTip="Click để sửa" ImageUrl="~/Images/edit.png" CommandArgument='<%# Eval("id") %>' />
                                    </ItemTemplate>
                                </asp:TemplateField>
                                <asp:TemplateField ItemStyle-HorizontalAlign="Center" HeaderStyle-HorizontalAlign="Center" ItemStyle-Width="7%" HeaderText="Xóa">
                                    <ItemTemplate>
                                        <asp:ImageButton ID="cmdDelete" runat="server" CssClass="command_button" CausesValidation="false"
                                            CommandName="Delete" ToolTip="Click để xóa" ImageUrl="~/Images/DeleteRed.png" CommandArgument='<%# Eval("id") %>' />
                                    </ItemTemplate>
                                </asp:TemplateField>
                                <asp:BoundField DataField="TieuDe" ItemStyle-Width="250" HeaderStyle-HorizontalAlign="Center" HeaderText="Tên Video"></asp:BoundField>
                                <asp:BoundField DataField="DienGiai" ItemStyle-Width="450" HeaderStyle-HorizontalAlign="Center" HeaderText="Diễn giải"></asp:BoundField>
                                <asp:BoundField DataField="MaCode" ItemStyle-Width="150" HeaderStyle-HorizontalAlign="Center" HeaderText="Link Video File"></asp:BoundField>
                                <asp:TemplateField ItemStyle-HorizontalAlign="Center" HeaderStyle-HorizontalAlign="Center" HeaderText="Đã đăng" ItemStyle-Width="8%">
                                    <ItemTemplate>
                                        <asp:Label ID="LabelTinNong" runat="server" Text='<%# (Eval("TrangThai").ToString())=="True" ? "<html><img src=../../Images/checkk.png /></html>" : "<html><img src=../../Images/redx.png /></html>"%>'></asp:Label>
                                    </ItemTemplate>
                                    <ItemStyle HorizontalAlign="Center" Width="8%" />
                                </asp:TemplateField>
                            </Columns>
                            <RowStyle ForeColor="#000066" />
                            <SelectedRowStyle BackColor="#dedfdf" Font-Bold="True" ForeColor="Gray" />
                            <HeaderStyle BackColor="#006699" Font-Bold="True" HorizontalAlign="Left" ForeColor="White" />
                        </asp:GridView>
                    </td>
                </tr>
                <tr>
                    <td colspan="2" height="10">
                        &nbsp;
                    </td>
                </tr>
            </table>
        </asp:Panel>
    </div>
    <asp:Panel ID="Panel2" CssClass="div_footer" BackColor="#d6e6f5" runat="server" Height="24px">
        <table border="0" cellpadding="0" cellspacing="0" width="100%">
            <tr>
                <td>
                </td>
                <td align="right">
                    <cc1:Pager ID="Pager1" runat="server" PreviousClause="" NextClause="" LastClause=""
                        FirstClause="" PageClause="Trang" OfClause="/" PageSize="15" OnCommand="Pager1_Command">
                    </cc1:Pager>
                </td>
            </tr>
        </table>
    </asp:Panel>
    </ContentTemplate>
    </asp:UpdatePanel>
</asp:Content>

